<template>
    <div class="DetailsBasicInformation">
        <Form>
          <Row :gutter="16">
          <!-- 基本信息 -->
          <div class="label_title" v-if="baseInfoVos.length>0">基本信息</div>
            <div v-for="(item) in baseInfoVos" :key="item.dbKey">
              <!-- <Col span="12" v-if="item.dbKey == 'channel_source'">
                <FormItem label="来源渠道：">
                  <span >{{ channelMess(item.fieldResValue) }}</span>
                </FormItem>
              </Col> -->
              <Col span="12" v-if="item.dbKey != 'customer_name'&&item.dbKey != 'customer_phone'&&item.dbKey != 'status'&&item.dbKey != 'customer_feature'&&item.dbKey != 'gender'">
                <FormItem :label="item.fieldValue+'：'" >
                  <span>{{item.fieldResValue || '-'}}</span>
                </FormItem>
              </Col>
            </div>
          <!-- 置业需求 -->
          <div class="label_title" v-if="buyDemandVos.length>0">置业需求</div>
            <div v-for="(item) in buyDemandVos" :key="item.dbKey">
              <!-- <Col span="12" v-if="item.dbKey == 'annual_income'">
                <FormItem label="年收入：">
                  <span>{{item.fieldResValue?item.fieldResValue+'万':'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-else-if="item.dbKey == 'home_count'">
                <FormItem label="置业次数：">
                  <span>{{item.fieldResValue?item.fieldResValue+'次' :'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-else-if="item.dbKey == 'payment_ratio'">
                <FormItem label="付款比例：">
                  <span >{{item.fieldResValue || '-'}}%</span>
                </FormItem>
              </Col> -->
              <Col span="12">
                <FormItem :label="item.fieldValue+'：'" >
                  <span>{{item.fieldResValue || '-'}}</span>
                </FormItem>
              </Col>
            </div>
          <!-- 客户画像 -->
          <div class="label_title" v-if="customerInfoVos.length>0">客户画像</div>
            <div v-for="(item) in customerInfoVos" :key="item.dbKey">
              <!-- <Col span="12" v-if="item.dbKey == 'intention_house_type'">
                <FormItem label="意向户型：" >
                  <span >{{item.fieldResValue === '3'?'不限':item.fieldResValue || '-'}}</span>
                </FormItem>
              </Col> -->
              <!-- <Col span="12" v-else-if="item.dbKey == 'check_in_method'">
                <FormItem label="签到方式：">
                  <span>{{item.fieldResValue==1?'扫码签到':item.fieldResValue==2?'手动签到':item.fieldResValue==3?'新增客户签到':'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-else-if="item.dbKey == 'source_type'">
                <FormItem label="创建方式：" >
                  <span>{{item.fieldResValue==1?'扫码录入':item.fieldResValue==2?'手动录入': item.fieldResValue==3?'pc录入': item.fieldResValue==4?'小程序注册录入': '-'}}</span>
                </FormItem>
              </Col> -->
              <!-- <Col span="12" v-else-if="item.dbKey == 'reception_time'">
                <FormItem label="接待时长：">
                  <span>{{item.fieldResValue?item.fieldResValue+"分钟" : '-'}}</span>
                </FormItem>
              </Col> -->
              <Col span="12">
                <FormItem :label="item.fieldValue+'：'" >
                  <span>{{item.fieldResValue || '-'}}</span>
                </FormItem>
              </Col>
            </div> 
          <!-- 服务信息 -->
          <div class="label_title" v-if="serviceInfoVos.length>0">服务信息</div>
            <div v-for="(item) in serviceInfoVos" :key="item.dbKey">
              <Col span="24" v-if="item.dbKey == 'attention_factor'">
                <FormItem label="关注因素：" >
                  <span >{{item.fieldResValue || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="24" v-else-if="item.dbKey == 'resistance_points'">
                <FormItem label="抗性因素：" >
                  <span >{{item.fieldResValue || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-else>
                <FormItem :label="item.fieldValue+'：'" >
                  <span>{{item.fieldResValue || '-'}}</span>
                </FormItem>
              </Col>
            </div>
            <!-- <div v-for="(item,index) in baseInfoVos" :key="index"> -->
              <!-- <Col span="12" v-if="item == 'customer_name'">
                <FormItem label="客户姓名：" >
                  <span>{{basicInformatData.customerName || '-'}}</span>
                </FormItem>
              </Col> -->
              <!-- <Col span="12" v-if="item == 'gender'">
                <FormItem label="性别：">
                  <span >{{basicInformatData.gender || '-'  }}</span>
                </FormItem>
              </Col> -->
              <!-- <Col span="12" v-if="item == 'customer_phone'">
                <FormItem label="手机号码：" >
                  <span >{{basicInformatData.customerPhone || '-'}}</span>
                </FormItem>
              </Col> -->
              <!-- <Col span="12" v-if="item == 'standby_phone'">
                <FormItem label="备用号码：" >
                  <span >{{basicInformatData.standbyPhone || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'wechat'">
                <FormItem label="微信号：" >
                  <span >{{basicInformatData.wechat || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'channel_source'">
                <FormItem label="来源渠道：">
                  <span >{{ channelMess(basicInformatData.channelSource) }}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'intention_product'">
                <FormItem label="意向业态：">
                  <span>{{ basicInformatData.intentionProduct || '-'  }}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'tel_change_visit'">
                <FormItem label="是否电转访：">
                  <span>{{ basicInformatData.telChangeVisit || '-'  }}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'intention_level'">
                <FormItem label="意向等级：" >
                  <span>{{ basicInformatData.intentionLevel || '-' }}</span>
                </FormItem>
              </Col> -->
              <!-- <Col span="12" v-if="item == 'status'">
                <FormItem label="客户进度：" >
                  <span >{{ basicInformatData.status || '-' }}</span>
                </FormItem>
              </Col> -->
              <!-- <Col span="12" v-if="item == 'intention_purpose'">
                <FormItem label="置业目的：" >
                  <span>{{basicInformatData.intentionPurpose || '-' }}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'intention_house_type'">
                <FormItem label="意向户型：" >
                  <span >{{basicInformatData.intentionHouseType === '3'?'不限':basicInformatData.intentionHouseType || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'intention_area'">
                <FormItem label="意向面积：">
                  <span >{{basicInformatData.intentionArea || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'intention_total_price'">
                <FormItem label="意向总价：" >
                  <span >{{basicInformatData.intentionTotalPrice || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'intention_average_price'">
                <FormItem label="意向单价：" >
                  <span >{{basicInformatData.intentionAveragePrice || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'intention_region'">
                <FormItem label="意向区域：">
                  <span >{{basicInformatData.intentionRegion==='3'?'不限':basicInformatData.intentionRegion || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'intention_subway'">
                <FormItem label="意向地铁：" >
                  <span >{{basicInformatData.intentionSubway === '3'?'不限':basicInformatData.intentionSubway || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'intention_loop_line'">
                <FormItem label="意向环线：" >
                  <span >{{basicInformatData.intentionLoopLine === '3'?'不限':basicInformatData.intentionLoopLine || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'down_payment_interval'">
                <FormItem label="首付区间：">
                  <span >{{basicInformatData.downPaymentInterval?basicInformatData.downPaymentInterval : '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'payment_ratio'">
                <FormItem label="付款比例：">
                  <span >{{basicInformatData.paymentRatio || '-'}}%</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'attention_building'">
                <FormItem label="关注楼栋：" >
                  <span >{{basicInformatData.attentionBuilding || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'attention_floor'">
                <FormItem label="关注楼层：" >
                  <span >{{basicInformatData.attentionFloor || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="24" v-if="item == 'attention_factor'">
                <FormItem label="关注因素：" >
                  <span >{{basicInformatData.attentionFactor || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="24" v-if="item == 'resistance_points'">
                <FormItem label="抗性因素：" >
                  <span >{{basicInformatData.resistancePoints || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'number_visiting'">
                <FormItem label="来访人数：" >
                  <span >{{basicInformatData.numberVisiting || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'visitor_structure'">
                <FormItem label="来访人员结构：">
                  <span>{{basicInformatData.visitorStructure || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'his_first_time'">
                <FormItem label="首访时间：">
                  <span>{{basicInformatData.hisFirstTime || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'reception_time'">
                <FormItem label="接待时长：">
                  <span>{{basicInformatData.receptionTime?basicInformatData.receptionTime+"分钟" : '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'age_range'">
                <FormItem label="客户年龄：">
                  <span>{{basicInformatData.ageRange || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'purchase_integral'">
                <FormItem label="购房积分：">
                  <span>{{basicInformatData.purchaseIntegral || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'payment_type'">
                <FormItem label="付款方式：">
                  <span>{{ $formatter.switchName("paymentType", basicInformatData.paymentType)  || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'history_marriage'">
                <FormItem label="近期婚史：">
                  <span>{{basicInformatData.historyMarriage || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'census'">
                <FormItem label="户籍：">
                  <span>{{basicInformatData.census || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'buy_house_qualification'">
                <FormItem label="购房资质：">
                  <span>{{basicInformatData.buyHouseQualification || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'loans_qualification'">
                <FormItem label="贷款资质：" >
                  <span>{{basicInformatData.loansQualification || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'family_structure'">
                <FormItem label="家庭结构：">
                  <span>{{basicInformatData.familyStructure || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'living_area'">
                <FormItem label="居住区域：" >
                  <span>{{basicInformatData.livingAreaName || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'working_area'">
                <FormItem label="工作区域：" >
                  <span>{{basicInformatData.workingAreaName || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'vehicle'">
                <FormItem label="交通工具：" >
                  <span>{{basicInformatData.vehicle || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'industry'">
                <FormItem label="从事行业：" >
                  <span>{{basicInformatData.industry || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'position'">
                <FormItem label="职务职位：" >
                  <span>{{basicInformatData.position || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'education_background'">
                <FormItem label="学历：" >
                  <span>{{basicInformatData.educationBackground || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'capital_source'">
                <FormItem label="资金来源：" >
                  <span>{{basicInformatData.capitalSource || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'key_decision_maker'">
                <FormItem label="决策关键人：" >
                  <span>{{basicInformatData.keyDecisionMaker || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'house_num'">
                <FormItem label="现有房产套数：" >
                  <span>{{basicInformatData.houseNum || '-'}}</span>
                </FormItem>
              </Col> -->
              <!-- <Col span="12" v-if="item == 'customer_feature'">
                <FormItem label="客户特征：" >
                  <span>{{basicInformatData.customerFeature || '-'}}</span>
                </FormItem>
              </Col> -->
              <!-- <Col span="12" v-if="item == 'filingTime'">
                <FormItem label="创建时间：" >
                  <span>{{basicInformatData.createTime || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'creationMethod'">
                <FormItem label="创建方式：" >
                  <span>{{basicInformatData.sourceType==1?'扫码录入':basicInformatData.sourceType==2?'手动录入': basicInformatData.sourceType==3?'pc录入': basicInformatData.sourceType==4?'小程序注册录入': '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'buildingAliasName'">
                <FormItem label="归属楼盘：" >
                  <span>{{detailsRes.buildingAlias || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'userNameName'">
                <FormItem label="归属顾问：" >
                  <span>{{basicInformatData.userAlias || '-'}}</span>
                </FormItem>
              </Col>


              <Col span="12" v-if="item == 'work_unit'">
                <FormItem label="工作单位：">
                  <span>{{basicInformatData.workUnit || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'annual_income'">
                <FormItem label="年收入：">
                  <span>{{basicInformatData.annualIncome?basicInformatData.annualIncome+'万':'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'now_live_house'">
                <FormItem label="居住小区：">
                  <span>{{basicInformatData.nowLiveHouse || '-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'home_count'">
                <FormItem label="置业次数：">
                  <span>{{basicInformatData.homeCount?basicInformatData.homeCount+'次' :'-'}}</span>
                </FormItem>
              </Col>

              <Col span="12" v-if="item == 'attribution_consultant'">
                <FormItem label="归属顾问：">
                  <span>{{basicInformatData.attributionConsultant?basicInformatData.attributionConsultant :'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'create_time'">
                <FormItem label="创建日期：">
                  <span>{{basicInformatData.createTime?basicInformatData.createTime :'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'last_visit_time'">
                <FormItem label="最近到访时间：">
                  <span>{{basicInformatData.lastVisitTime?basicInformatData.lastVisitTime :'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'check_in_method'">
                <FormItem label="签到方式：">
                  <span>{{basicInformatData.checkInMethod==1?'扫码签到':basicInformatData.checkInMethod==2?'手动签到':basicInformatData.checkInMethod==3?'新增客户签到':'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'last_follow_up_time'">
                <FormItem label="最近跟进时间：">
                  <span>{{basicInformatData.lastFollowUpTime?basicInformatData.lastFollowUpTime :'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'visit_count'">
                <FormItem label="来访次数：">
                  <span>{{basicInformatData.visitCount?basicInformatData.visitCount :'-'}}</span>
                </FormItem>
              </Col>
              <Col span="12" v-if="item == 'demand_land'">
                <FormItem label="需求地段：">
                  <span>{{basicInformatData.demandLand||'-'}}</span>
                </FormItem>
              </Col>

              <Col span="12" v-if="item == 'cognitive_channel'">
                <FormItem label="认知途径：">
                  <span>{{basicInformatData.cognitiveChannel||'-'}}</span>
                </FormItem>
              </Col> -->
            <!-- </div> -->
          </Row>
        </Form>
    </div>
</template>
<script>
  import { customerFindSpecial,getCustomerInfoAll, customerHeadList } from "@/api/customerManagement.js";
  import { getstandingBookGetGroup } from "@/api/standBookList"
  import { getCaseChannelList } from "@/api/configure.js";
  export default {

    components: {
    },
    props: ['servicePersonnelId', 'comNames'],
    data() {
        return {
            baseInfoVos:[],
            buyDemandVos:[],
            customerInfoVos:[],
            serviceInfoVos:[],
          basicInformatData: '',
          detailsRes: '',
          channelList:[],
          channelType:['-','线下投放','网络媒体','渠道带看','客户运营','其他']
        }
    },
    methods: {
      // 初始化获取数据
      initData() {
        let params = {
          userCustomerId:this.$route.query.userCustomerId,
          buildingId:this.$route.query.buildingId,
          userId: JSON.parse(this.$tool.getStorage('userMess')).userId,
          type:1,
          customerId: this.$route.query.customerId,
        }
        getCustomerInfoAll(params).then(res=>{
          if (res) {
            console.log(res,'getCustomerInfoAll初始化获取数据')
            this.getChannelList(res);
            
            // res.intentionArea = ""
            // res.intentionTotalPrice = ""
            // res.intentionAveragePrice = "";
            //首付区间
            // if(res.downPaymentInterval){
            //    res.downPaymentInterval = res.downPaymentInterval.split(",").join("-")+""
            // }
            // if (res.more.intentionArea) {
            //   if (typeof(res.more.intentionArea) == 'string') {
            //     res.intentionArea = '不限'
            //   } else {
            //     res.more.intentionArea.forEach((item)=> {
            //       res.intentionArea += item.start == 0?`${item.end}㎡以下,`:item.end == 999999999?`${item.start}㎡以上,`:`${item.start}㎡-${item.end}㎡,`
            //     })
            //   }
            // } else {
            //   res.intentionArea = ''
            // }
            // if (res.more.intentionTotalPrice) {
            //   if (typeof(res.more.intentionTotalPrice) == 'string') {
            //     res.intentionTotalPrice = '不限'
            //   } else {
            //     res.more.intentionTotalPrice.forEach((item)=> {
            //       res.intentionTotalPrice += item.start == 0?`${item.end}以下,`:item.end == 999999999?`${item.start}以上,`:`${item.start}-${item.end},`
            //     })
            //   }
            // } else {
            //   res.intentionTotalPrice = ''
            // }
            // if (res.more.intentionAveragePrice) {
            //   if (typeof(res.more.intentionAveragePrice) == 'string') {
            //     res.intentionAveragePrice = '不限'
            //   } else {
            //     res.more.intentionAveragePrice.forEach((item)=> {
            //       res.intentionAveragePrice += item.start == 0?`${item.end}以下,`:item.end == 999999999?`${item.start}以上,`:`${item.start}-${item.end},`
            //     })
            //   }
            // } else {
            //   res.intentionAveragePrice = ''
            // }
            // if (res.livingArea) {
            //   res.livingArea.split(',')
            //   if (res.livingArea.split(',')[0] == 2){
            //     //'外地-'
            //     res.livingAreaName = ''
            //     if (res.livingArea.split(',')[1] == 1 || res.livingArea.split(',')[1] == 4){
            //       res.livingAreaName = '外地'
            //     }
            //     if (res.livingArea.split(',')[1] != 1 && res.livingArea.split(',')[1] != 4){
            //       res.livingAreaName = res.livingArea.split(',')[1]
            //     }
            //     if (res.livingArea.split(',')[2] != 1 && res.livingArea.split(',')[2] != 4){
            //       res.livingAreaName = res.livingArea.split(',')[1] + '-' +res.livingArea.split(',')[2]
            //     }
            //     if (res.livingArea.split(',')[3] != 1 && res.livingArea.split(',')[3] != 4){
            //       res.livingAreaName =  res.livingArea.split(',')[1] + '-' + res.livingArea.split(',')[2] + '-' + res.livingArea.split(',')[3]
            //     }
            //     if (res.livingArea.split(',')[4] != 1 && res.livingArea.split(',')[4] != 4){
            //       res.livingAreaName = res.livingArea.split(',')[1] + '-' + res.livingArea.split(',')[2] + '-' + res.livingArea.split(',')[3] + '-' + res.livingArea.split(',')[4]
            //     }
            //   } else {
            //     res.livingAreaName = ''
            //     // if (res.livingArea.split(',')[1] != 1 && res.livingArea.split(',')[1] != 4){
            //     //   res.livingAreaName = res.livingArea.split(',')[1]
            //     // }
            //     // if (res.livingArea.split(',')[2] != 1 && res.livingArea.split(',')[2] != 4){
            //     //   res.livingAreaName = res.livingArea.split(',')[1] + '-' +res.livingArea.split(',')[2]
            //     // }
            //     if (res.livingArea.split(',')[3] == 1 && res.livingArea.split(',')[3] != 4){
            //       res.livingAreaName = res.livingArea.split(',')[2]
            //     }
            //     if (res.livingArea.split(',')[3] != 1 && res.livingArea.split(',')[3] != 4){
            //       res.livingAreaName =  res.livingArea.split(',')[3]
            //     }
            //     if (res.livingArea.split(',')[4] != 1 && res.livingArea.split(',')[4] != 4){
            //       res.livingAreaName = res.livingArea.split(',')[3] + '-' + res.livingArea.split(',')[4]
            //     }
            //   }
            // } else {
            //   res.livingAreaName = ''
            // }
            // if (res.workingArea) {
            //   res.workingArea.split(',')
            //   if (res.workingArea.split(',')[0] == 2){
            //     //外地
            //     res.workingAreaName = ''
            //     if (res.workingArea.split(',')[1] == 1 || res.workingArea.split(',')[1] == 4){
            //       res.workingAreaName = '外地'
            //     }
            //     if (res.workingArea.split(',')[1] != 1 && res.workingArea.split(',')[1] != 4){
            //       res.workingAreaName = res.workingArea.split(',')[1]
            //     }
            //     if (res.workingArea.split(',')[2] != 1 && res.workingArea.split(',')[2] != 4){
            //       res.workingAreaName = res.workingArea.split(',')[1] + '-' +res.workingArea.split(',')[2]
            //     }
            //     if (res.workingArea.split(',')[3] != 1 && res.workingArea.split(',')[3] != 4){
            //       res.workingAreaName = res.workingArea.split(',')[1] + '-' + res.workingArea.split(',')[2] + '-' + res.workingArea.split(',')[3]
            //     }
            //     if (res.workingArea.split(',')[4] != 1 && res.workingArea.split(',')[4] != 4){
            //       res.workingAreaName = res.workingArea.split(',')[1] + '-' + res.workingArea.split(',')[2] + '-' + res.workingArea.split(',')[3] + '-' + res.workingArea.split(',')[4]
            //     }
            //   } else {
            //     res.workingAreaName = ''
            //     // if (res.workingArea.split(',')[1] != 1 && res.workingArea.split(',')[1] != 4){
            //     //   res.workingAreaName = res.workingArea.split(',')[1]
            //     // }
            //     // if (res.workingArea.split(',')[2] != 1 && res.workingArea.split(',')[2] != 4){
            //     //   res.workingAreaName = res.workingArea.split(',')[1] + '-' +res.workingArea.split(',')[2]
            //     // }
            //     if (res.workingArea.split(',')[3] == 1 && res.workingArea.split(',')[3] != 4){
            //       res.workingAreaName = res.workingArea.split(',')[2]
            //     }
            //     if (res.workingArea.split(',')[3] != 1 && res.workingArea.split(',')[3] != 4){
            //       res.workingAreaName = res.workingArea.split(',')[3]
            //     }
            //     if (res.workingArea.split(',')[4] != 1 && res.workingArea.split(',')[4] != 4){
            //       res.workingAreaName = res.workingArea.split(',')[3] + '-' + res.workingArea.split(',')[4]
            //     }
            //   }
              this.basicInformatData = res
            // } else {
            //   res.workingAreaName = ''
            // }
            getstandingBookGetGroup({
              buildingId:this.servicePersonnelId.buildingId,type:2
            }).then(res => {
              console.log(res,'zjzres')
              customerFindSpecial({
                buildingId: this.servicePersonnelId.buildingId,
                customerId: this.$route.query.customerId,
                userCustomerId: this.$route.query.userCustomerId
              }).then(details => {
                  this.detailsRes = details
              })
              if (this.comNames == 'BasicInformation') {   // 基本信息
                // this.headArray = ['filingTime', 'creationMethod', 'buildingAliasName', 'userNameName']
                res.baseInfoVos.forEach((item)=> {
                  if (item.infoType == 1 && item.validate==1) {
                    if(item.dbKey == 'channel_source'){
                      item.fieldResValue = this.basicInformatData['channelSourceName']
                    }else{
                      item.fieldResValue = this.basicInformatData[item.fieldKey]
                    }
                    this.baseInfoVos.push(item)
                  }
                })
              } else if (this.comNames == 'HomeDemand') {   // 置业需求
                res.buyDemandVos.forEach((item)=> {
                  if ( item.infoType == 3 && item.validate==1) {
                      item.fieldResValue = this.basicInformatData[item.fieldKey]
                  }
                })
                this.buyDemandVos = res.buyDemandVos
              } else if (this.comNames == 'ServiceInformation') {   // 服务信息
                res.serviceInfoVos.forEach((item)=> {
                  if ( item.infoType == 2 && item.validate==1) {
                    item.fieldResValue = this.basicInformatData[item.fieldKey]
                  }
                })
                this.serviceInfoVos = res.serviceInfoVos
              } else if (this.comNames == 'CustomerPortrait') {   // 客户画像
                res.customerInfoVos.forEach((item)=> {
                  if (item.infoType == 4 && item.validate==1) {
                    // this.headArray.push(item.dbKey)
                    item.fieldResValue = this.basicInformatData[item.fieldKey]
                  }
                })
                this.customerInfoVos = res.customerInfoVos
              }
            })
          }
        }).catch(err=>{
           this.$Message.error(err)
        })
      
      },
      //获取台账列表（分组）
      getTableListGroup(){
        getstandingBookGetGroup({buildingId:this.servicePersonnelId.buildingId,type:2}).then(res=>{
          console.log("获取分类列表",res);
        })
      },
      //获取来源渠道列表
      getChannelList(mess){
        let {buildingId,userId,appId} = mess;
         getCaseChannelList({
           cityCode:this.$route.query.cityCode,
           buildingId,
           userId,
           appId,
           page:1,
           rows:100
         }).then(res=>{
            this.channelList = res.list;
         })
      }
    },
    computed: {
      channelMess(){
        console.log(123123123123123)
         return function(mess){
            if(!mess || this.channelList.length <1)return "-";
            let messDate = this.channelList.find(item=>item.channelId == mess),name,channel;
            messDate && (name = messDate.channelName)&&(channel= this.channelType[messDate.channelType-0]);
            return name?channel + "-" +name : "-";
         }
      }
    },
    created() {
    },
    watch: {
      servicePersonnelId:{
        handler(newV,oldV){
          if (this.servicePersonnelId.servicePersonnelVal) {
            this.initData();
            // this.getTableListGroup();
          }
        },
        deep: true, //深度遍历
        immediate: true //默认false，设置为true会立即执行
      }
    },
  }
</script>
<style lang="scss" scoped>
.DetailsBasicInformation{
  .label_title{
    color: #194fe8;
    font-size: 20px;
  }
  .ivu-form-item{
    margin-bottom: 4px;
  }
  .editFeatures{
    vertical-align: middle;
    margin-left: 20px;
    cursor: pointer;
    display: inline-block;
  }
}
.customerVisitModel{
  p{
    margin-bottom: 10px;
  }
  .footer{
    padding-top: 20px;
    text-align: center;
    button{
      width: 120px;
      margin: 0 10px;
    }
  }
}
</style>
